package com.learn.designPatterns.structuralType.FlyWeight;

/**
 * @classname:
 * @Description:
 * @author: yfpu
 * @Date: 2018-10-31 17:30
 */
public class Client {

    public static void main(String[] args) {
        FlyWeightFactory flyWeightFactory = new FlyWeightFactory();
        FlyWeight flyWeight1 = flyWeightFactory.getFlyWeight("aa");
        FlyWeight flyWeight2 = flyWeightFactory.getFlyWeight("aa");
        flyWeight1.doOperation("x");
        flyWeight2.doOperation("y");
    }
}
